/*
 * @Author: 18163104359 2205227953@qq.com
 * @Date: 2024-01-22 18:08:32
 * @LastEditors: 18163104359 2205227953@qq.com
 * @LastEditTime: 2024-01-25 09:22:26
 * @FilePath: /umi/src/layouts/components/Content/index.jsx
 * @Description:
 */
import React, { useState, useEffect } from "react";
import { Outlet, connect, location } from "umi";
import { Watermark, Layout, Spin } from "antd";
const { Header, Content, Sider } = Layout;

const ContentComponents = (props) => {
  const { appConfig } = props;
  // 根据后端返回权限码 识别是否具有路由权限
  return (
    <Content
      style={{
        padding: 24,
        margin: 0,
        minHeight: 280,
        height: "100%",
      }}
    >
      <Watermark
        height={50}
        width={130}
        content={appConfig.watermark == "1" ? ["GuitarXiaohe", "MyReact"] : ""}
      >
        {/* <Spin indicator={
      <LoadingOutlined
        style={{
          fontSize: 24,
        }}
        spin
      /> spinning={appConfig.spinning} fullscreen /> */}
        <Outlet />
      </Watermark>
    </Content>
  );
};
export default connect((state) => ({ appConfig: state.appConfig }))(ContentComponents);
